package com.wxzz.elearing.pay.service.openfeign;

import com.alibaba.fastjson.JSONObject;
import com.wxzz.elearning.common.vo.ReturnVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient("2125-wxzzlearn-course-application")
public interface ICurriculumApiFeign {

    /**
     * 企业购买课程后拷贝数据
     *
     * @param enterpriseId
     * @param curriculumId
     * @param orderId
     */
    @RequestMapping(value = "/curriculum-api/copyNewCurriculum/{enterpriseId}/{curriculumId}/{orderId}", method = RequestMethod.POST)
    void copyNewCurriculum(@PathVariable Long enterpriseId, @PathVariable Long curriculumId, @PathVariable Long orderId);

    /**
     * 根据订单id查询用户购买的课程信息
     *
     * @param orderId
     * @return
     */
    @RequestMapping(value = "/curriculum-api/selectCurriculumByOrderId/{orderId}", method = RequestMethod.POST)
    ReturnVO<JSONObject> selectCurriculumByOrderId(@PathVariable Long orderId);

    /**
     * 根据订单id查询企业购买的课程信息
     *
     * @param orderId
     * @return
     */
    @RequestMapping(value = "/curriculum-api/selectCurriculum4EnterpriseByOrderId/{orderId}", method = RequestMethod.POST)
    ReturnVO<JSONObject> selectCurriculum4EnterpriseByOrderId(@PathVariable Long orderId);
}
